package com.example.yuejian.yuejian.activity;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

import com.example.yuejian.yuejian.R;

public class PlayVideoActivity extends AppCompatActivity {
       private VideoView videoView;
    String videoUrl;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_play_video);
        videoView= (VideoView) findViewById(R.id.videoView);

/**
 * 本地视频播放
 *
 */
videoView.setVideoPath("");
        /**
         * wangluo 视频播放
         */
        Intent intent=getIntent();
        ;
        videoView.setVideoURI(Uri.parse(intent.getStringExtra("video_url")));

        MediaController controller=new MediaController(this);
        videoView.setMediaController(controller);
        controller.setMediaPlayer(videoView);

    }

}
